﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Sails.DB
{
    /// <summary>
    /// 数据服务
    /// </summary>
    public interface IDataBase
    {
        /// <summary>
        /// 测试连接
        /// </summary>
        /// <returns></returns>
        bool TestConnect();
        /// <summary>
        /// 执行查询
        /// </summary>
        /// <param name="sql"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        DataTable Exec(string sql,Dictionary<string,object> param);

        /// <summary>
        /// 执行增删改
        /// </summary>
        /// <param name="sql"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        int IExec(string sql, Dictionary<string, object> param);
    }
}
